 import { getToken } from "@/utils"
import { Navigate } from "react-router-dom"
import { message } from "antd"
export const AuthRoute =( {children})=>{ 
     
    let token =getToken() 
    if (token) {
    //   return  <>{children}</>
      return   children 
    }else{
      message.error("请先登录！")
        return <Navigate to={'/login'}></Navigate>
    }
}
   